package solutions.ferpa.ztest.rest.action;

import br.com.telescope.adsrt.lib.BaseRuntime;
import solutions.ferpa.ztest.rest.RestService;
import solutions.ferpa.ztest.rest.model.res.EchoRQ;
import solutions.ferpa.ztest.rest.model.res.EchoRS;

@RestAction(action = "echo", rqType = EchoRQ.class, rsType = EchoRS.class)
public class Echo extends RestService<EchoRQ, EchoRS> {

    public Echo(BaseRuntime ctx) {
        super(ctx);
    }

    @Override
    public EchoRS call() throws Exception {
        EchoRS rs = new EchoRS();
        rs.setResource(bindRequest(EchoRQ.class).getEcho());

        return rs;
    }
}
